package com.iam.api.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.iam.api.service.SysCompanyService;
import com.iam.api.service.SysDictTypeService;
import com.iam.core.base.BaseCommonController;
import com.iam.core.model.SysCompany;
import com.iam.core.model.SysDictType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/api/sysDictType")
public class SysDictTypeController extends BaseCommonController<SysDictType> {


    @Autowired
    private SysDictTypeService<SysDictType> service;

    /**
     * 获取service
     */
    @Override
    public SysDictTypeService<SysDictType> getiService() {
        return service;
    }

    @Override
    public boolean exist(SysDictType entity) {
        return service.exists(new QueryWrapper<SysDictType>().eq("code", entity.getCode()));
    }

    /**
     * 获取模块名称
     */
    @Override
    public String getMouduleName() {
        return "字典数据";
    }

}